<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>个人成绩录入</title>
<style type="text/css">
 .contrainer{
   width:800px;
   margin:20px auto
 }
  .contrainer h3{
    text-align:center;
  }
  .contrainer table{
    width:100%; 
    border-collapse:collapse;
  }
  td,th{
    padding:8px 15px;
    text-align:center;
  }
</style>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
   function bjChange(value){
	   $.post('grade',{method:'getStu',bjId:value},function(data){
		   $('#stu').html(data);
	   },'html');
   }
   function cx(){
	   var studentId=$('#stu').val();
      $('#table').load('grade',{method:'getPeasonGrade',stuId:studentId});
   }
   function cjChange(id,value){
	   $.post('grade',{method:'cjChange',grade:value,id:id},function(data){})
   }
</script>
</head>
<body background="images/1.jpg">
   <p>
     <label>班级</label>
      <select id="bj"style="margin-right: 10px;" onchange="bjChange(this.value)">
         <option value="0">---请选择----</option>
         <c:forEach items="${list1}" var="bj">
         
         <option value="${bj.id}">${bj.name}</option> 
      </c:forEach>
      </select>
         <label>学生</label>
      <select id="stu" style="margin-right: 10px;">
         <option value="0">---请选择----</option>

      </select>
      <button type="button" onclick="cx()">查找</button>
   </p>
   <div id="table">
   </div>
   <a href="main.jsp">返回主页</a>
</body>
</html>